{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Processing: 100%|██████████| 1275/1275 [00:03<00:00, 393.75it/s]\n",
      "Processing: 100%|██████████| 142/142 [00:00<00:00, 289.48it/s]\n"
     ]
    }
   ],
   "source": [
    "from asr_deepspeech import cfg\n",
    "from asr_deepspeech.data.loaders import get_loader\n",
    "from tqdm import tqdm\n",
    "# Init the loaders\n",
    "(train_loader, _), (test_loader, _) = get_loader(\n",
    "    labels=cfg.model.label_path,\n",
    "    audio_conf=cfg.model.audio_conf,\n",
    "    manifest=cfg.loaders.train_manifest,\n",
    "    batch_size=cfg.loaders.batch_size,\n",
    "    num_workers=cfg.loaders.num_workers,\n",
    "    caching=cfg.loaders.caching,\n",
    "), get_loader(\n",
    "    labels=cfg.model.label_path,\n",
    "    audio_conf=cfg.model.audio_conf,\n",
    "    manifest=cfg.loaders.val_manifest,\n",
    "    batch_size=cfg.loaders.batch_size,\n",
    "    num_workers=cfg.loaders.num_workers,\n",
    "    caching=cfg.loaders.caching,\n",
    ")\n",
    "for _ in tqdm(train_loader, total=len(train_loader), desc=\"Processing\"):\n",
    "    pass\n",
    "\n",
    "for _ in tqdm(test_loader, total=len(test_loader), desc=\"Processing\"):\n",
    "    pass"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.8 ('base')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "d4d1e4263499bec80672ea0156c357c1ee493ec2b1c70f0acce89fc37c4a6abe"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
